package com.nudge.portlet.api;

/**
 * This enum contains all values associated to the granularity.
 *
 * @author Frederic Massart
 */
public enum GranularityType {

    /**
     * Defines the default granularity, which this granularity returns all the data consolidated on a time period.
     */
    DEFAULT("default"),
    /**
     * One minute granularity.
     */
    ONE_MIN("1min"),
    /**
     * Five minutes granularity.
     */
    FIVE_MIN("5min"),
    /**
     * Ten minutes granularity.
     */
    TEN_MIN("10min"),
    /**
     * One hour granularity.
     */
    ONE_HOUR("1hour"),
    /**
     * Six hours granularity.
     */
    SIX_HOUR("6hour"),
    /**
     * One day granularity.
     */
    ONE_DAY("1day"),
    /**
     * Seven days granularity.
     */
    SEVEN_DAY("7day"),
    /**
     * Thirty days granularity.
     */
    THIRTY_DAY("30day");

    /**
     * This attribute contains the value associated with the enum.
     */
    private final String value;

    /**
     * Private constructor that associates the value to the enum.
     *
     * @param value the value to associate
     */
    private GranularityType(final String value) {
        this.value = value;
    }

    /**
     * The getter of the value of the enum.
     *
     * @return the value of the enum
     */
    public String getValue() {
        return this.value;
    }


}
